const http = uni.$u.http

//查询优惠卷
export const getCouponList = (data, config = { }) => 
	http.get('/user/coupon/list', Object.assign({ }, config, 
		{
			params: data,
		}))

//使用优惠卷
export const getUseCoupon = (data, config = { }) => 
	http.get('/user/coupon/use', Object.assign({ }, config, 
		{
			params: data,
		}))

//可用优惠卷数量
export const getCouponNum = (data, config = { }) => 
	http.get('/user/coupon/number', Object.assign({ }, config, 
		{
			params: data,
		}))
//查询可领优惠卷列表
export const getAvailableCouponList = (data, config = { }) => 
	http.get('/user/coupon/available', Object.assign({ }, config, 
		{
			params: data,
		}))
//领取优惠卷
export const receiveCouponApi = (data, config = { }) => 
	http.get('/user/coupon/receive', Object.assign({ }, config, 
		{
			params: data,
		}))
//返还优惠卷
export const returnCouponApi = (data, config = { }) =>
	http.get('/user/coupon/returnCoupon', Object.assign({ }, config, 
		{
			params: data,
		}))
//优惠卷的判断
export const checkCouponAvailability = (data, config = { }) =>
	http.get('/user/coupon/checkScope', Object.assign({ }, config, 
		{
			params: data,
		}))
// export const checkCouponAvailability = (data, config = {}) => 
// 	http.post('/user/coupon/checkScope', data, Object.assign({}, config))